package com.yp.studentsys.web.controller;


import com.yp.studentsys.common.ResponseCode;
import com.yp.studentsys.common.ResponseResult;
import com.yp.studentsys.entity.RcStudent;
import com.yp.studentsys.service.RcStudentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yp
 * @since 2022-04-01
 */
@Api("学员操作接口")
@RestController
@RequestMapping("/rcStudent")
@CrossOrigin
public class RcStudentController {

    @Autowired
    private RcStudentService studentService;
    @ApiOperation("获取学员全数据列表")
    @GetMapping("/list")
    public ResponseResult list(){
            //直接返回成功的响应
        return ResponseResult.createSuccess(studentService.list());
    }
}
